<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<jsp:directive.page import="com.anhry.app.safety.util.Util"/>
<%@ include file="/WEB-INF/pages/share/taglib.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>菜单编辑</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link href="<%=basePath+Util.SKIN%>/css/right.css" type="text/css" rel="stylesheet">
	<script type="text/javascript" src="<%=basePath%>/js/jquery-1.7.1.min.js"></script>
	<script type="text/javascript" src="<%=basePath %>/js/dbdialog/lhgdialog.min.js?self=false&<%=Util.DIALOG_SKIN%>"></script>
	<script type="text/javascript" src="<%=basePath %>/js/util.js"></script>
  </head>
  
  <body>
	<div  class="body-box">
		<div class="map">
			<div class="map_con">
				您当前的位置：系统管理 &gt; 菜单管理
			</div>
		</div>
		<div id="container">
		  	<table border="0" cellpadding="0" cellspacing="0" class="mytable">
		   		<thead>
			    	<tr class="fixedHeaderTr">
			     		<th width="10%">序号</th>
			     		<th width="20%">角色名称</th>
			     		<th width="50%">备注</th>
			     		<th width="10%">状态</th>
			     		<th width="10%">操作</th>
			    	</tr>
		   		</thead>
			   	<tbody>
			   		<s:if test="%{roleList.size>0}">
			   			<s:iterator value="roleList" id="obj" status="x">
				   			<tr>
					     		<td align="center">${x.index+1+(page.num-1)*page.size}</td>
					     		<td align="center">${obj.roleName }</td>
					     		<td align="center">${obj.roleRemark }</td>
					     		<td align="center">${obj.isDele==0?'正常':'<font color="red">锁定</font>' }</td>
					     		<td align="center">
					     		<sp:permission module="role" permissionType="${UPDATE}"><a href="<%=basePath %>/admin/sys_roleUpdate.action?objId=${obj.id }">修改</a></sp:permission>
					     		<sp:permission module="role" permissionType="${DELETE}">
					     			<s:if test="%{#obj.isDele==0}"><a href="<%=basePath %>/admin/sys_roleClock.action?objId=${obj.id }&clock=1">锁定</a></s:if>
					     			<s:else><a href="<%=basePath %>/admin/sys_roleClock.action?objId=${obj.id }&clock=0">解锁</a></s:else>
					     		</sp:permission>
					     		</td>
					    	</tr>
			   			</s:iterator>
			    	</s:if>
			    	<s:else>
				    	<tr>
				     		<td align="center" colspan="4">暂无数据</td>
				    	</tr>
			    	</s:else>
			   	</tbody>
		  	</table>
		  	<div class="btn_page">
		  		<sp:permission module="role" permissionType="${CREATE}"><input type="button" class="link_input" value="创建角色" onclick="window.location.href='<%=basePath %>/admin/sys_roleAdd.action'"/></sp:permission>
		  	</div>
		  	<div class="page">
				<jsp:include flush="true" page="../share/fenye.jsp">
				    <jsp:param name="url4page" value="/admin/sys_roleList.action" />
			    </jsp:include>	    	
		    </div>
	 	</div>
	</div>
  </body>
  <s:if test="%{tip!=null}">
    	<script>
    		msgDialog('${tip}', 'succ.png');
    	</script>
    </s:if>
</html>
